﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using DevAlogrithm.Alogrithm;

/** 
 ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **
 * Description: 
 * Author: Heller (HellerSong@outlook.com)
 * CreationTime: 3/4/2015 2:14:32 PM
 ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** 
 **/
namespace DevAlogrithm
{
    [TestClass]
    public class TestRecursion
    {
        [TestMethod]
        public void test_factorial()
        {
            int sum1 = Recursion.factorial1(4);
            Console.WriteLine("Factorial(1): " + sum1);

            int sum2 = 0;
            sum2 = Recursion.factorial2(sum2, 4);
            Console.WriteLine("Factorial(2): " + sum2);

            int sum3 = Recursion.factorial3(4);
            Console.WriteLine("Factorial(3): " + sum3);
        }
    }
}
